import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    redirect:'/sys-admin/add/SA',
    children:[
      {
        path: '/sys-admin/add/SA',
        component: () => import('../views/sys-admin/add/Storage application.vue')
      },
      {
        path: '/sys-admin/add/WEI',
        component: () => import('../views/sys-admin/add/warehouse entry inspection.vue')
      },
      {
        path: '/sys-admin/add/FA',
        component: () => import('../views/sys-admin/add/fixed assets.vue')
      },
      {
        path: '/sys-admin/Manage assets/AC',
        component: () => import('../views/sys-admin/Manage assets/Asset Collection.vue')
      },
      {
        path: '/sys-admin/Manage assets/AA',
        component: () => import('../views/sys-admin/Manage assets/Asset allocation.vue')
      },
      {
        path: '/sys-admin/Manage assets/AB',
        component: () => import('../views/sys-admin/Manage assets/Asset Borrowing.vue')
      },
      {
        path: '/sys-admin/Manage assets/AI',
        component: () => import('../views/sys-admin/Manage assets/Asset impairment.vue')
      },
      {
        path: '/sys-admin/Manage assets/AR',
        component: () => import('../views/sys-admin/Manage assets/Asset retirement.vue')
      },
      {
        path: '/sys-admin/Manage assets/ARe',
        component: () => import('../views/sys-admin/Manage assets/Asset repair.vue')
      },
      {
        path: '/sys-admin/Manage assets/return',
        component: () => import('../views/sys-admin/Manage assets/Asset return.vue')
      },
      {
        path: '/sys-admin/Manage assets/changes',
        component: () => import('../views/sys-admin/Manage assets/Asset changes.vue')
      }

    ]
  },
  {
    path: '/about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/other',
    component: () => import('../views/OtherView.vue')
  },
  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/home',
    component: () => import('../views/HomeView.vue')
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router